<template>

    <div>
    
        <m-table name="admin-todayclockin" :action="action" :search="search">

            <el-table-column label="昵称" prop="name" />

            <el-table-column label="手机号" prop="phone" />
    
            <el-table-column label="今日打卡" prop="today" />

            <el-table-column label="逾期天数" prop="overdue_days" />
            
            <el-table-column label="提醒打卡">
                <template slot-scope="scope">
                    <el-button :disabled="scope.row.todayState == 1" size="mini" type="success" @click="clockin(scope.row)">提醒打卡</el-button>
                </template>
            </el-table-column>
           
        </m-table>
    
    </div>
    </template>
    
    <script>
    import  request  from '@/utils/request'
    export default {
        data() {
            return {
                search: [
                    { icon: 'el-icon-mobile', type: 'like', name: 'name', label: '用户姓名', span: 4, value: '' },
                    { icon: 'el-icon-mobile', type: 'like', name: 'phone', label: '联系方式', span: 4, value: '' }
                ],
                action: { remove: false, edit: false, add: false, export: false }
            }
        },
        methods:{
            
            async clockin(e){
                await request.post(`/admin-todayclockin/clockin/${e.id}`)
                this.$message.success('提醒成功')
            }
        }
    }
    </script>
    
    <style>
    .tag{
        font-size: 10px !important;
    }
    </style>